/*
 * Copyright (c) 2023 vitasystems GmbH
 *
 * This file is part of project EHRbase Migration Tool
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.ehrbase.migration.exporter.v0.jooq.pg.tables.records;

import java.util.UUID;
import org.ehrbase.migration.exporter.v0.jooq.pg.tables.AdminGetLinkedCompositionsForContrib;
import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Row1;
import org.jooq.impl.TableRecordImpl;

/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({"all", "unchecked", "rawtypes"})
public class AdminGetLinkedCompositionsForContribRecord
        extends TableRecordImpl<AdminGetLinkedCompositionsForContribRecord> implements Record1<UUID> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for
     * <code>ehr.admin_get_linked_compositions_for_contrib.composition</code>.
     */
    public void setComposition(UUID value) {
        set(0, value);
    }

    /**
     * Getter for
     * <code>ehr.admin_get_linked_compositions_for_contrib.composition</code>.
     */
    public UUID getComposition() {
        return (UUID) get(0);
    }

    // -------------------------------------------------------------------------
    // Record1 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row1<UUID> fieldsRow() {
        return (Row1) super.fieldsRow();
    }

    @Override
    public Row1<UUID> valuesRow() {
        return (Row1) super.valuesRow();
    }

    @Override
    public Field<UUID> field1() {
        return AdminGetLinkedCompositionsForContrib.ADMIN_GET_LINKED_COMPOSITIONS_FOR_CONTRIB.COMPOSITION;
    }

    @Override
    public UUID component1() {
        return getComposition();
    }

    @Override
    public UUID value1() {
        return getComposition();
    }

    @Override
    public AdminGetLinkedCompositionsForContribRecord value1(UUID value) {
        setComposition(value);
        return this;
    }

    @Override
    public AdminGetLinkedCompositionsForContribRecord values(UUID value1) {
        value1(value1);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached AdminGetLinkedCompositionsForContribRecord
     */
    public AdminGetLinkedCompositionsForContribRecord() {
        super(AdminGetLinkedCompositionsForContrib.ADMIN_GET_LINKED_COMPOSITIONS_FOR_CONTRIB);
    }

    /**
     * Create a detached, initialised AdminGetLinkedCompositionsForContribRecord
     */
    public AdminGetLinkedCompositionsForContribRecord(UUID composition) {
        super(AdminGetLinkedCompositionsForContrib.ADMIN_GET_LINKED_COMPOSITIONS_FOR_CONTRIB);

        setComposition(composition);
        resetChangedOnNotNull();
    }
}
